package com.atguigu.day31.scope;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/12/10 15:29
 * @注释
 */
@WebServlet("/scopeCreate")
public class ScopeCreate extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("ScopeCreate 请求到达了");

        req.setAttribute("username","柯基");

        req.getRequestDispatcher("scopeGet").forward(req,resp);

        resp.getWriter().println("ScopeCreate Response Success");
    }
}
